/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MTFPanel.java
 *
 * Created on 25-nov-2011, 9:55:31
 */
package DQE.GUI;
    // Variables declaration - do not modify
/**
 *
 * @author Física
 */
public class MTFPanel extends javax.swing.JPanel {

    /** Creates new form MTFPanel */
    public MTFPanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel8 = new javax.swing.JLabel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        lbPath = new javax.swing.JLabel();
        jToggleButton3 = new javax.swing.JToggleButton();
        btCalcular = new javax.swing.JButton();
        optionsPanel = new javax.swing.JPanel();
        checkBorderTransmision = new javax.swing.JCheckBox();
        checkAverage = new javax.swing.JCheckBox();
        checkOverSample = new javax.swing.JCheckBox();
        radioMLS = new javax.swing.JRadioButton();
        radioHough = new javax.swing.JRadioButton();
        checkAutoROI = new javax.swing.JCheckBox();
        lbRoiSize = new javax.swing.JLabel();
        checkAutoEdge = new javax.swing.JCheckBox();
        lbEdgeAngle = new javax.swing.JLabel();
        check1 = new javax.swing.JCheckBox();
        jButton1 = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        lbOverSample = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        cbRotar = new javax.swing.JComboBox();
        jLabel4 = new javax.swing.JLabel();

        buttonGroup1.add(radioMLS);
        buttonGroup1.add(radioHough);

        setMaximumSize(new java.awt.Dimension(800, 500));
        setMinimumSize(new java.awt.Dimension(800, 500));
        setPreferredSize(new java.awt.Dimension(800, 500));

        jLabel8.setBackground(new java.awt.Color(51, 255, 0));
        jLabel8.setText("MTF Imagen 1/5");
        jLabel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLabel8.setOpaque(true);

        jButton8.setText("<");
        jButton8.setToolTipText("imagen siguiente");
        jButton8.setMargin(new java.awt.Insets(2, 2, 2, 2));
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setText(">");
        jButton9.setToolTipText("Imagen anterior");
        jButton9.setMargin(new java.awt.Insets(2, 2, 2, 2));
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        lbPath.setBackground(new java.awt.Color(255, 255, 255));
        lbPath.setText("Path (n/N)");
        lbPath.setToolTipText("Nombre completo de la imagen");
        lbPath.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbPath.setOpaque(true);

        jToggleButton3.setText("Zoom");
        jToggleButton3.setToolTipText("Zoom y movimiento de la imagen");
        jToggleButton3.setMargin(new java.awt.Insets(2, 2, 2, 2));

        btCalcular.setText("Calcular MTF");
        btCalcular.setToolTipText("Calcula las MTF");
        btCalcular.setMargin(new java.awt.Insets(2, 2, 2, 2));
        btCalcular.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btCalcularActionPerformed(evt);
            }
        });

        optionsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Opciones"));

        checkBorderTransmision.setText("Corrección por transmisión del borde");
        checkBorderTransmision.setToolTipText("Define automáticamentela posición del borde");

        checkAverage.setSelected(true);
        checkAverage.setText("Promediar MTF de las distintas imágenes");
        checkAverage.setToolTipText("Define automáticamentela posición del borde");
        checkAverage.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkAverageActionPerformed(evt);
            }
        });

        checkOverSample.setSelected(true);
        checkOverSample.setText("Sobremuestreo");
        checkOverSample.setToolTipText("Define automáticamentela posición del borde");
        checkOverSample.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkOverSampleActionPerformed(evt);
            }
        });

        radioMLS.setSelected(true);
        radioMLS.setText("Mínimos cuadrados");

        radioHough.setText("Transformada de Hough");

        checkAutoROI.setSelected(true);
        checkAutoROI.setText("Definición autom. de la ROI");
        checkAutoROI.setToolTipText("Define automáticamente el ROI");
        checkAutoROI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkAutoROIActionPerformed(evt);
            }
        });

        lbRoiSize.setBackground(new java.awt.Color(255, 255, 255));
        lbRoiSize.setText(" 50*50 mm²");
        lbRoiSize.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbRoiSize.setOpaque(true);

        checkAutoEdge.setSelected(true);
        checkAutoEdge.setText("Definición autom. del borde");
        checkAutoEdge.setToolTipText("Define automáticamentela posición del borde");

        lbEdgeAngle.setBackground(new java.awt.Color(255, 255, 255));
        lbEdgeAngle.setText(" 5º");
        lbEdgeAngle.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbEdgeAngle.setOpaque(true);

        check1.setSelected(true);
        check1.setText("Promediar las ESF de cada línea");
        check1.setToolTipText("Define automáticamentela posición del borde");

        jButton1.setText("Predeterminadas IEC");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel3.setText(" Ajuste");

        lbOverSample.setBackground(new java.awt.Color(255, 255, 255));
        lbOverSample.setText(" N = 20");
        lbOverSample.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        lbOverSample.setOpaque(true);

        javax.swing.GroupLayout optionsPanelLayout = new javax.swing.GroupLayout(optionsPanel);
        optionsPanel.setLayout(optionsPanelLayout);
        optionsPanelLayout.setHorizontalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(optionsPanelLayout.createSequentialGroup()
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, optionsPanelLayout.createSequentialGroup()
                            .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(checkAutoROI)
                                .addComponent(checkAutoEdge)
                                .addComponent(checkOverSample))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(lbEdgeAngle, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(lbRoiSize, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE))
                                .addComponent(lbOverSample, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(optionsPanelLayout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jButton1)))
                    .addComponent(check1)
                    .addGroup(optionsPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(radioMLS)
                            .addComponent(jLabel3)
                            .addComponent(radioHough)))
                    .addComponent(checkBorderTransmision)
                    .addComponent(checkAverage))
                .addContainerGap())
        );
        optionsPanelLayout.setVerticalGroup(
            optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, optionsPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(checkAutoROI)
                    .addComponent(lbRoiSize))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(checkAutoEdge)
                    .addComponent(lbEdgeAngle))
                .addGap(7, 7, 7)
                .addComponent(jLabel3)
                .addGap(7, 7, 7)
                .addComponent(radioMLS)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(radioHough)
                .addGap(3, 3, 3)
                .addComponent(check1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addGroup(optionsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(checkOverSample)
                    .addComponent(lbOverSample))
                .addGap(4, 4, 4)
                .addComponent(checkBorderTransmision)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(checkAverage)
                .addGap(31, 31, 31)
                .addComponent(jButton1)
                .addContainerGap())
        );

        jLabel1.setText("Info: Tam. pixel (fNy), eje de la MTF");
        jLabel1.setMaximumSize(null);
        jLabel1.setMinimumSize(null);
        jLabel1.setPreferredSize(null);

        cbRotar.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "      ----", " Rotar 90º", "Rotar 180º", "Rotar 270º", "Reflejar H", "Reflejar V" }));
        cbRotar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbRotarActionPerformed(evt);
            }
        });

        jLabel4.setText("Rotar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbRotar, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jToggleButton3))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addComponent(lbPath, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButton9))
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(optionsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(btCalcular, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbPath, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                    .addComponent(jButton9)
                    .addComponent(jButton8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(optionsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 412, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btCalcular)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jToggleButton3)
                        .addComponent(cbRotar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel4)))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_jButton8ActionPerformed
    }
        private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_jButton9ActionPerformed
        }
        private void btCalcularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCalcularActionPerformed

// TODO add your handling code here:}//GEN-LAST:event_btCalcularActionPerformed
        }
private void checkAverageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAverageActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkAverageActionPerformed

private void checkOverSampleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkOverSampleActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkOverSampleActionPerformed

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed

private void cbRotarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbRotarActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_cbRotarActionPerformed

    private void checkAutoROIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAutoROIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_checkAutoROIActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btCalcular;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbRotar;
    private javax.swing.JCheckBox check1;
    private javax.swing.JCheckBox checkAutoEdge;
    private javax.swing.JCheckBox checkAutoROI;
    private javax.swing.JCheckBox checkAverage;
    private javax.swing.JCheckBox checkBorderTransmision;
    private javax.swing.JCheckBox checkOverSample;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JToggleButton jToggleButton3;
    private javax.swing.JLabel lbEdgeAngle;
    private javax.swing.JLabel lbOverSample;
    private javax.swing.JLabel lbPath;
    private javax.swing.JLabel lbRoiSize;
    private javax.swing.JPanel optionsPanel;
    private javax.swing.JRadioButton radioHough;
    private javax.swing.JRadioButton radioMLS;
    // End of variables declaration//GEN-END:variables
}
